package com.crm.cust.service;


import com.crm.cust.entity.Cust;
import com.crm.cust.mapper.CustMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CustService {
    @Autowired
    private CustMapper custMapper;
    // 查询客户列表
    public List<Cust> query(String custType,String custName,String custNumber) {
        return custMapper.query(custType,custName,custNumber);
    }
    // 添加客户
    public Long add(Cust cust) {
        return  custMapper.add(cust);
    }
    // 跟新客户
    public int update(Cust cust){
        return custMapper.update(cust);
    }
    // 删除客户
    public int delete(Long id){
        return custMapper.delete(id);
    }
    // 获取单个客户
    public Cust get(Long id){
        return custMapper.get(id);
    }

}
